<!--
 * @Author: zqx me_zqx@163.com
 * @Date: 2025-01-09 11:32:21
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-06-26 16:51:05
 * @FilePath: /meeting-minutes-h5/src/views/study/components/courseCell.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <van-cell class="pl-10 pr-5">
    <div class="flex flex-row items-center justify-between text-left flex-auto">
      <p
        :class="`font-normal flex-auto text-sm text-[#262626] leading-6 ${isPlaying ? 'text-blue-500' : ''} `"
      >
        {{ item.chapterName }}
      </p>
      <div class="min-w-[30px]">
        <img class="ml-4" :src="statusIcon" />
      </div>
    </div>
  </van-cell>
</template>

<script>
import icons from "@/icons/svg/minute/index";

export default {
  name: "courseCell",
  props: {
    item: {
      typeof: Object
    },
    isPlaying: {
      typeof: Boolean,
      default: false
    }
  },
  data() {
    return {
      icons
    };
  },

  computed: {
    statusIcon() {
      if (this.item.status === 0) {
        return this.icons.unstartIcon;
      } else if (this.item.status === 1) {
        return this.icons.inProgressIcon;
      } else {
        return this.icons.courseDoneIcon;
      }
    }
  }
};
</script>

<style lang="less" scoped></style>
